<script id="database_view-container-template" type="text/x-handlebars-template">
    <div id="database-view">
        <div class="operations">
            <div class="dropdown">
                <button class="btn dropdown-toggle" data-toggle="dropdown">Operations</button>
                <ul class="dropdown-menu">
                    <li><a href="#" class="rename">Rename database</a></li>
                    <li><a href="#" class="delete">Delete database</a></li> 
                </ul>
            </div>
        </div>
        <div class="main_title"></div>
        <div id="user-alert-space"></div>
        <div class="section statistics">
            <h2 class="title">Statistics</h3>
            <div class="content row-fluid">
                <div class="span4 profile"></div>
                <div class="span8 performance-graph"></div>
            </div>
        </div>
        <div class="section table-list list-view"></div>
    </div>
</script>

<script id="database_view_title-template" type="text/x-handlebars-template">
    <h1 class="title">Database overview for {{name}}</h1>
</script>

<script id="database_view-profile-template" type="text/x-handlebars-template">
    <div class="summary">
        <div class="stat-row first">
            <p class="tables"><span class="big">{{num_live_namespaces}}/{{num_namespaces}} </span> tables live</p>
        </div>
        <div class="stat-row">
            <p class="masters"><span class="big">{{nshards}} </span> {{pluralize_noun "shard" nshards}}</p>
        </div>
        <div class="stat-row">
            <p class="replicas"><span class="big">{{nreplicas}} </span> {{pluralize_noun "replica" nreplicas}}</p>
        </div>
        <div class="stat-row">
            <p class="datacenters"><span class="big">{{ndatacenters}} </span> {{pluralize_noun "datacenter" ndatacenters}}</p>
        </div>
    </div>
</script>

<script id="database_view-namespace_list-template" type="text/x-handlebars-template">
    <h2 class="title">Tables in this database</h2>
    {{#if has_tables}}
    <ul class="tables">
        {{#each tables}}
            <li class="table">
                <p class="name"><a href="#tables/{{id}}">{{name}}</a></p>
                <p class="info"><span class="highlight">{{nshards}}</span> {{pluralize_noun "shard" nshards}}, <span class="highlight">{{nreplicas}}</span> {{pluralize_noun "replica" nreplicas}}</p>
                <p class="status">{{humanize_namespace_reachability reachability}}</p>
            </li>
        {{/each}}
    </ul>
    {{else}}
    <div class="no_element">
        This database does not contain any tables.
    </div>
    {{/if}}
</script>

<script id="remove_database-modal-template" type="text/x-handlebars-template">
    <div class="alert mismatch_container">
       This name doesn't match the name of the database you're trying to delete. 
    </div>
    <div class="alert alert-error displayed_alert">Deleting the database will delete all the tables in it.<br/>This action <strong>cannot</strong> be undone.</div>
    <div class="alert alert-error error_answer"></div>
    <p>Please type in the name of the database to confirm.</p>
    <div class="input">
        <input class="xlarge large_input verification_name" name="name" size="30" type="text" placeholder="Name of the database"/>
    </div>
</script>
